﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true"
    CodeBehind="List.aspx.cs" Inherits="Kym.Web.Views.Messages.List" %>
<%@ Import Namespace="Kym.Web.Controllers"%>
<%@ Import Namespace="MvcContrib.UI.Html.Grid"%>
<%@ Import Namespace="MvcContrib.UI.Html"%>

<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
    <%
        Html.Grid(ViewData.Model, b =>
                                      {
                                          b.For(m => m.Content);
                                          b.For(m => m.Sender.Name, "From");
                                          b.For(m => m.Receiver.Name, "To");
                                          b.For(m => m.DeliveryDate);
                                          b.For(m => Html.ActionLink<MessagesController>(c => c.Details(m.ID), "Details")).DoNotEncode();
                                          b.For(m => Html.ActionLink<MessagesController>(c => c.Edit(m.ID), "Edit")).DoNotEncode();
                                          b.For(m => Html.ActionLink<MessagesController>(c => c.Delete(m.ID), "Delete")).DoNotEncode();
                                      });
%>
</asp:Content>
